workspaceAnimation: Sort existing records when restacking
When restacking, we currently re-filter window actors, then match
each to the corresponding record.
Instead, sort the existing records according to the new stacking,
then iterate over those directly.
This reflects more directly that window records are fixed during
the transition, and avoids a (harmless) warning in case a window
only appeared during the animation and therefore cannot be
matched to a record.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/8881
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4199>
(cherry picked from commit
e7e6de300cfb87c0f91738861b545017e5290ef9)